home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
036a
/
pmfinder.zip
/
ZIP.H
< prev
next >
Wrap
Text File
|
1991-12-03
|
2KB
|
64 lines
struct ZipLocalFileHeader {
unsigned VersionNeededToExtract;
unsigned GeneralPurposeBitFlag;
unsigned CompressionMethod;
DOS_FILE_TIME LastModFileTime;
DOS_FILE_DATE LastModFileDate;
unsigned long Crc32;
unsigned long CompressedSize;
unsigned long UncompressedSize;
unsigned FileNameLength;
unsigned ExtraFieldLength;
};
struct CentralDirectoryFileHeader {
unsigned VersionMadeBy;
unsigned VersionNeededToExtract;
unsigned GeneralPurposeBitFlag;
unsigned CompressionMethod;
DOS_FILE_TIME LastModFileTime;
DOS_FILE_DATE LastModFileDate;
unsigned long Crc32;
unsigned long CompressedSize;
unsigned long UncompressedSize;
unsigned FileNameLength;
unsigned ExtraFieldLength;
unsigned FileCommentLength;
unsigned DiskNumberStart;
unsigned InternalFileAttributes;
unsigned long ExternalFileAttributes;
unsigned long RelativeOffsetLocalHeader;
};
struct EndCentralDirRecord {
unsigned NumberThisDisk;
unsigned CentralDirectoryStartDisk;
unsigned CentralDirEntries_ThisDisk;
unsigned TotalEntriesCentralDirectory;
unsigned long SizeCentralDirectory;
unsigned long OffsetStartCentralDirectory;
unsigned ZipFileCommentLength;
};
typedef unsigned long SIGNATURE;
typedef struct ZipLocalFileHeader ZIP_LOCAL_FILE_HEADER;
typedef struct CentralDirectoryFileHeader CENTRAL_DIRECTORY_FILE_HEADER;
typedef struct EndCentralDirRecord END_CENTRAL_DIRECTORY_RECORD;
#define LOCAL_FILE_HEADER_SIGNATURE 0x04034B50L
#define CENTRAL_FILE_HEADER_SIGNATURE 0x02014B50L
#define END_CENTRAL_DIR_SIGNATURE 0x06054B50L
#define SEARCH_SIZE 2048
char *ZipCompression[] = {
" Stored ", " Shrunk ", "Reduce-1", "Reduce-2", "Reduce-3", "Reduce-4"
};
/* Prototypes for ZIP Processing Functions */
void ProcessLocalFileHeader (FILE *ZIPFile);
void ProcessCentralFileHeader (FILE *ZIPFile, char *Path);
void ProcessEndCentralDir (FILE *ZIPFile);
int ProcessHeaders (FILE *ZIPFile, char *Path,char *Pattern,HWND hwndListBox);
void GetString (FILE *ZIPFile, int Size, char *Buffer);